package cn.zt.controller;


import cn.zt.common.Result;
import cn.zt.service.TLoanDetailsService;
import cn.zt.service.TLoanProductService;
import cn.zt.service.TLoanProductTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("loan")
public class LoanController {
    @Autowired
    TLoanDetailsService tLoanDetailsService;
    @Autowired
    TLoanProductService tLoanProductService;
    @Autowired
    TLoanProductTypeService tLoanProductTypeService;
    @RequestMapping("loanList")
    public Result loanList(){
        return Result.success(tLoanDetailsService.loanList());
    }
    @RequestMapping("loanDetails")
    public Result loanDetails(Integer id){
        return Result.success(tLoanDetailsService.getById(id));
    }
}
